﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Iacym.Entities;

namespace Iacym.Repository
{
    public class Foto_PersonaRepository:MasterRepository,IFoto_PersonaRepository
    {
        public List<FOTO_PERSONA> GetAllFromFotoPersona()
        {
            var query = from c in context.FOTO_PERSONA
                        select c;
            return query.ToList();
        }

        public FOTO_PERSONA GetFromFotoPersonaByPersonaId(int id)
        {
            var query = from c in context.FOTO_PERSONA
                        where c.PersonaId.Equals(id)
                        select c;
            return query.SingleOrDefault();
        }
    }
}
